require "sparkle/refreshable"
require "active_support"

class Rails

  class Cache

    def read(key)
      @cache ||= {}
      @cache[key]
    end

    def write(key, value)
      @cache ||= {}
      @cache[key] = value
    end

    def clear
      @cache = {}
    end

  end

  def self.cache
    @cache ||= Cache.new
  end

end

class RefreshMe

  include ClassInheritableAttributes
  include Sparkle::Refreshable

  sparkle_refresh_method :slow_method

  def slow_method
  end

end
